perm filename PROB7.PUB[LSP,JRA]1 blob sn#084473 filedate 1974-01-28 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.SS(Problems involving %3prog%*)
C00004 ENDMK
CāŠ—;
.SS(Problems involving %3prog%*)
.BEGIN SELECT 1;TABIT1(10);CENTERIT;
.GROUP
Write %3prog%*-versions of the following functions (or predicates).

%21.%3 member[x;y]<= ... : x%1 is atomic; %3y%* is a list of atoms.  %3member%* is to 
return %3T%* just in the case that %3x%* is one of the elements in %3y%*.
.APART

%22.%1 The factorial funciion.

%23.%3  delete[x;y]<= ... : x%1 is atomic; %3y%* is a list of atoms.  %3delete%* is to 
return a list which looks like %3y%*, except all occurrences of %3x%*
have been deleted.

%24.%1 The %3append%* function.

%25.%3  last[x]<= ... : x%1 is a non-empty list.  %3last%* is to return the last 
element in %3x%*.

%26.%1  Now write the Sexpr translations of each of your functions.
.GROUP


.END